package main

import (
	"log"
	"reflect"
)

func main() {
	var x float64 = 4.5

	ttd := reflect.TypeOf(x)
	log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)

	log.Printf("type=%s", ttd)

	v := reflect.ValueOf(&x)

	log.Printf("值=%d", v)

	//将对象还原成值
	// var y float64 = v.Interface().(float64)

	v.Elem().SetFloat(5.6)

	// log.Println("y=", y)

	log.Println("v=", v.Elem().Interface())
}
